Syntax Tables

A syntax table maps symbols to syntax descriptors. Every syntax descriptor is itself either a macro expander, or a unique token identifying a primitive special form type.

Every locale has an associated syntax table. A locale's syntax table contains definitions of special forms which are local to the locale. Each such syntax table inherits entries lexically from the syntax tables of enclosing locales.

Macros provide a mechanism for extending the syntax of T by means of source-to-source transformations. As in many Lisp dialects, the macro facility in T provides a powerful tool for amplifying the expressiveness of the language. But like any powerful tool, macros may be abused. They may easily lead to programs that are very hard to understand.

Macros are defined by entering syntax descriptor objects known as macro expanders into syntax tables; see SYNTAX-TABLE-ENTRY and DEFINE-SYNTAX, below. Macros may also be defined locally to a file or expression using DEFINE-LOCAL-SYNTAX or LET-SYNTAX.

Procedure integration is preferable to the use of macros in situations where either would be applicable. See DEFINE-INTEGRABLE, page [*].


\begin{inset}{}
Returns the syntax table associated with {\it environment\/}.
\end{inset}


\begin{inset}{}
Creates a new syntax table inferior to the given syntax table.
N...
...reated implicitly by {\tt MAKE-LOCALE}
(page \pageref{MAKE-LOCALE}).
\end{inset}


\begin{inset}{}
A syntax table with entries for all standard {\bf T} reserved wo...
...-TABLE $\equiv$\ (ENV-SYNTAX-TABLE-ENTRY STANDARD-ENV)
\end{codexenv}\end{inset}

Settable


\begin{inset}{}
Accesses the syntax descriptor associated with {\it symbol\/} in...
...be bound as a variable using
{\tt DEFINE} or {\tt LET}, for example.
\end{inset}